<!DOCTYPE html>
<html lang="en" xmlns:th="https://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>角色管理</title>
    <style>
        table{
            border-collapse: collapse;
            border: 2px solid black;
        }
        td, th{
            padding: 2px;
            border: 1px solid black;
        }
    </style>
</head>
<body>
    <a href="/role/info">新增角色</a>
    <table>
        <thead>
        <tr>
            <th scope="col">ID</th>
            <th scope="col">名字</th>
            <th scope="col">别名</th>
            <th scope="col">操作</th>
        </tr>
        </thead>
        <tbody>
        <tr th:each="role: ${roles}">
            <td th:text="${role.id}"></td>
            <td th:text="${role.name}"></td>
            <td th:text="${role.alias}"></td>
            <td>
                <a th:href="${ '/role/info?id=' + role.id }">修改</a>
                <a th:href="${ '/role/delete?id=' + role.id }">删除</a>
            </td>
        </tr>
        </tbody>
    </table>

</body>
</html>